package com.tdk.bts.util;

import java.util.HashMap;
import java.util.Map;

public class Request {
	
	private Map<String, Object> paramMap = new HashMap<String, Object>();
	
	private Map<String, Object> attrMap = new HashMap<String, Object>();
	
	public String getParameter(String key) 
	{
		Object value = paramMap.get(key);
		return value == null ? null : value.toString();
	}

	public String[] getParameterValues(String key)
	{
		String str = (String)paramMap.get(key);
		return str.split(",");
	}
	
	public Object getAttribute(String key) 
	{
		return attrMap.get(key);
	}
	
	public void setAttribute(String key,Object value)
	{
		attrMap.put(key, value);
	}
	
	public void setParameter(String key,Object value)
	{
		String valueStr = value == null ? "" : value.toString();
		paramMap.put(key, valueStr);
	}
}
